a. Field of the Invention
This invention relates to a servomotor control method and, more particularly, to a servomotor control method using a pulse coder which detects absolute position.
b. Description of the Related Art
In digital servomotor control for digitally controlling a servomotor, a traveling distance .DELTA.R.sub.n along each axis is computed every predetermined time .DELTA.T by a numerical controller and fed into a digital servo-circuit. The digital servo-circuit performs an arithmetic operation in accordance with the following equation every .DELTA.T: EQU E.sub.r +.DELTA.R.sub.n -.DELTA.P.sub.n .fwdarw.E.sub.r
(where .DELTA.P.sub.n is the actual distance traveled every .DELTA.T, and E.sub.r represents position error) to execute pulse width modulation in dependence upon the size of the position error, thereby controlling the rotation of the servomotor.
FIG. 3 is a block diagram of such a conventional digital servo-circuit, which includes an arithmetic unit 1 for computing the difference every predetermined time .DELTA.T between a move command .DELTA.R.sub.n and the actual distance traveled .DELTA.P.sub.n, an error counter 2 for accumulating the output (.DELTA.R.sub.n -.DELTA.P.sub.n) of the arithmetic unit 1 in accordance with the equation EQU E.sub.r +(.DELTA.R.sub.n -.DELTA.P.sub.n).fwdarw.E.sub.r
a setting unit 3 for setting position gain K.sub.p, a velocity controller 4, a current controller 5, a hardware unit 6, such as a servoamplifier and servomotor, a pulse coder 7 for generating N-number of pulses per revolution of the servomotor, an integrator 8 for counting up the pulses generated by the pulse coder 7 every .DELTA.T and outputting a value M of the count, and a DMR multiplying unit 9 for multiplying the output M of the integrator 8 by a detection multiplier ratio DMR and outputting the distance .DELTA.P.sub.n traveled in the time .DELTA.T, with the units of .DELTA.P.sub.n being the same as the set units of the move command .DELTA.R.sub.n.
The detection multiplier ratio DMR is a value obtained, in accordance with the following equation, from a traveling distance L of a movable machine element per revolution of the servomotor, a traveling distance (set units) R per pulse of the move command, and a number of pulses N (pulse/rev) output by the pulse coder 7 per revolution of the servomotor: EQU DMR=L/(R.multidot.N)
Accordingly, if the set units R of the move command are 0.1 .mu.m/pulse, the traveling distance L of the movable machine element per motor revolution is 8 mm and the number N of pulses generated by the pulse coder per motor revolution is 2000 pulses/rev, then DMR=4 will be obtained from the foregoing equation and the units of the actual distance traveled .DELTA.P.sub.n input to the arithmetic unit 1 will be (0.1 .mu.m/pulse), which is the same as the set units of the move command.
With the conventional method, only a special integer can be used as the value of the DMR. Consequently, a plurality of different pulses coders, each of which outputs a different number of pulses in revolution, are prepared in advance and a pulse coder is selected to construct the servo-system in such a manner that the DMR obtained from the foregoing equation can be made the special integer. With this approach, however, a large number of pulse coders must be prepared in advance. Moreover, because of the relation involving R, cases arise in which the DMR will not become the integer regardless of which of the prepared pulse coders is used.
When a value other than an integer is used as the DMR, a numerical value arises following the decimal point in the results of the multiplication operation in the DMR multiplying unit. This value following the decimal point accumulates as an error every .DELTA.T, thereby lowering the precision of servomotor control. Accordingly, a numerical value other than an integer cannot be employed as the DMR.
An object of the present invention is to provide a servomotor control method in which any numerical value, even one including a decimal point, may serve as the DMR, and in which it is unnecessary to prepare a variety of pulse coders.